package com.gxuwz.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gxuwz.core.util.SystemContext;
import com.gxuwz.dao.impl.SysRoleDao;
import com.gxuwz.pojo.SysRole;
import com.gxuwz.pojo.SysRole;
import com.gxuwz.service.ISysRoleService;

@Service("sysRoleService")
public class SysRoleServiceImpl implements ISysRoleService {

	@Autowired
	private SysRoleDao sysRoleDao;

	@Override
	public List<SysRole> list(SysRole entity) {
		// TODO Auto-generated method stub
		return sysRoleDao.findByEntity(entity);
	}

	@Override
	public SysRole save(SysRole entity) {
		// TODO Auto-generated method stub
		return sysRoleDao.save(entity);
	}

	@Override
	public void remove(SysRole entity) {
		// TODO Auto-generated method stub
		sysRoleDao.remove(entity);
	}

	@Override
	public void update(SysRole entity) {
		// TODO Auto-generated method stub
		sysRoleDao.update(entity);
	}

	@Override
	public List<SysRole> findByHql(String queryString, Object[] params) {
		// TODO Auto-generated method stub
		return sysRoleDao.findByHql(queryString, params);
	}

	@Override
	public List<SysRole> findByExample(Object exampleEntity) {
		// TODO Auto-generated method stub
		return sysRoleDao.findByExample(exampleEntity);
	}

	@Override
	public List<SysRole> findByEntity(SysRole entity) {
		// TODO Auto-generated method stub
		return sysRoleDao.findByEntity(entity);
	}

	@Override
	public SysRole findById(Integer id) {
		// TODO Auto-generated method stub
		return sysRoleDao.find("form SysRole where id="+id).get(0);
	}

	@Override
	public List<SysRole> findByProperty(String property, String value) {
		// TODO Auto-generated method stub
		return sysRoleDao.findByProperty(property, value);
	}
	


}
